	//
	//  GaoTvcLllModel.m
	//  OpenglDemo
	//
	//  Created by Gikki Ares on 2020/9/13.
	//

#import "JsTvcLllModel.h"
#import "JsGeometryManager.h"

@interface Prefix(TvcLllModel)()

{
	CGFloat mf_titleWidth;
}

@end

@implementation Prefix(TvcLllModel)

- (instancetype)initWithIndex:(NSString *)index title:(NSString *)title desc:(NSString *)desc{
	if(self = [super init]) {
		self.index = index;
		self.title = title;
		self.desc = desc;
		self.commonStyle = [JsTvcLllStyle defaultStyle];
		
	}
	return self;
}

- (CGFloat)cellHeight {
	mf_titleWidth = [UIScreen mainScreen].bounds.size.width - 50;
	CGFloat titleHeight = [JsGeometryManager sizeForMultiLineStringWithContext:self.title font:self.commonStyle.titleFont maxWidth:mf_titleWidth].height;
	CGFloat descHeight = [JsGeometryManager sizeForMultiLineStringWithContext:self.desc font:self.commonStyle.detailFont maxWidth:mf_titleWidth].height;
	CGFloat padding = self.commonStyle.paddingV;
	CGFloat height = titleHeight + descHeight + padding * 3;
	return height;
}



@end
